<template>
  <div class="container-box">
    <commonNavBar title="个人资料" :isRightIcon="false" @back="leftBack"></commonNavBar>
    <van-cell-group>
      <van-field label="姓名" v-model="userInfos.name" input-align="right" readonly />
      <van-field label="性别" v-model="gender" input-align="right" readonly />
      <van-field label="出生日期" v-model="userInfos.birthday" input-align="right" readonly />
      <van-field label="民族" v-model="nation" input-align="right" readonly />
      <van-field label="学历" v-model="education" input-align="right" readonly />
      <van-field label="身份证号" v-model="userInfos.certificateNo" input-align="right" readonly />
      <van-field label="联系方式" v-model="userInfos.phone" input-align="right" readonly />
    </van-cell-group>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import { methodsMixins } from '@/utils/mixins.js'
export default {
  name: 'PersonalData',
  mixins: [methodsMixins],
  data() {
    return {
      gender: '',
      nation: '',
      education: ''
    }
  },
  computed: {
    ...mapGetters(['userInfos'])
  },
  created() {
    this.gender = this.formatDictCode('XB', this.userInfos.genderCode)
    this.nation = this.formatDictCode('MZ', this.userInfos.nationCode)
    this.education = this.formatDictCode('RCBT_SLXL', this.userInfos.educationCode)
  },
  methods: {
    leftBack() {
      this.$router.push('/GRZX')
    }
  }
}
</script>

<style lang="less" scoped>
.container-box {
  height: 100vh;
  /deep/.van-nav-bar .van-icon {
    // font-size: 60px !important;
    color: #061226;
  }
  /deep/.van-cell {
    font-size: 30px;
  }
}
</style>
